package com.springboot.swagger2.service;

import com.springboot.swagger2.entity.User;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @Desc:
 * @Date: 2020-07-12
 * @Version:v1.0
 */
@Service
public class UserService {

    public User findUserByName(String username) {
        return new User(1, username);
    }

    public List<User> findAll() {
        return new ArrayList<>();
    }

    public User saveUser(User user) {
        return user;
    }

    public User findUserById(int id) {
        return new User(1, "李四");
    }

    public User updateUser(User user) {
        return new User(1, "张三");
    }

    public int deleteUserById(int id) {
        return 1;
    }
}
